@extends('layouts.adminlayout')

@section('main')

<section class="content">
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title">Chỉnh Sửa Thông Tin Liên Hệ</small></h3>
            </div><!-- /.box-header -->

            <div class="box-body">

                <form action="<?php echo asset('contacts/updatecontact'); ?>" method="post" role="form">         
                    <div class="form-group">
                        {{ Form::textarea('thongtinlienhe',$thongtinlienhe,array('style'=>'width:100%','class'=>'form-control')) }}
                    </div>
                    <button type="submit" class="btn btn-primary">Cập Nhật</button>
                </form>
                <br>
                @if ($errors->any())
                    {{ implode('', $errors->all('<div class="error callout callout-danger">:message</div>')) }}
                @endif
            </div>
        </div>
</section>
<!-- CKEditor -->
    <script src="<?php echo asset('public/plugins/ckeditor/ckeditor.js'); ?>" type="text/javascript"></script>
    <script src="<?php echo asset('public/plugins/ckeditor/adapters/jquery.js'); ?>" type="text/javascript"></script>
    <!-- CKFinder -->
    <script src="<?php echo asset('public/plugins/ckfinder/ckfinder.js'); ?>" type="text/javascript"></script>
    <script type="text/javascript">
        $( document ).ready( function() {
            var noi_dung = CKEDITOR.replace( 'thongtinlienhe', {
                filebrowserBrowseUrl : '<?php echo asset("public/plugins/ckfinder/ckfinder.html"); ?>',
                filebrowserImageBrowseUrl : '<?php echo asset("public/plugins/ckfinder/ckfinder.html?type=Images"); ?>',
                filebrowserFlashBrowseUrl : '<?php echo asset("public/plugins/ckfinder/ckfinder.html?type=Flash"); ?>',
                filebrowserUploadUrl : '<?php echo asset("public/plugins/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files"); ?>',
                filebrowserImageUploadUrl : '<?php echo asset("public/plugins/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images"); ?>',
                filebrowserFlashUploadUrl : '<?php echo asset("public/plugins/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash"); ?>'
            });
            CKFinder.setupCKEditor( noi_dung, '<?php echo asset("public/plugins"); ?>');
            CKFinder.setupCKEditor( tom_tat, '<?php echo asset("public/plugins"); ?>');
        } );
    </script>
@stop